home *** CD-ROM | disk | FTP | other *** search
/ Micromanía: 150 Juegos 2010 / 150Juegos_16.iso / Shareware / Shape Smash / shape-smash.swf / scripts / Code / LIB / animators / _lv705.as < prev    next >
Encoding:
Text File  |  2010-05-14  |  1.3 KB  |  59 lines

  1. package Code.LIB.animators
  2. {
  3.    import Code.LIB._be548;
  4.    
  5.    public class _lv705 extends _do643
  6.    {
  7.       public static const VERTICAL:int = 0;
  8.       
  9.       public static const HORIZONTAL:int = 1;
  10.       
  11.       private var mode:int;
  12.       
  13.       private var _done:Boolean;
  14.       
  15.       public function _lv705(param1:_be548, param2:int)
  16.       {
  17.          super(param1);
  18.          mode = param2;
  19.          switch(mode)
  20.          {
  21.             case VERTICAL:
  22.                target.scaleY = 0;
  23.                break;
  24.             case HORIZONTAL:
  25.                target.scaleX = 0;
  26.          }
  27.          _done = false;
  28.       }
  29.       
  30.       override public function _kx70() : Boolean
  31.       {
  32.          return _done == true;
  33.       }
  34.       
  35.       override public function onEnterFrame() : void
  36.       {
  37.          super.onEnterFrame();
  38.          if(_done)
  39.          {
  40.             return;
  41.          }
  42.          switch(mode)
  43.          {
  44.             case VERTICAL:
  45.                target.scaleY += 0.08;
  46.                break;
  47.             case HORIZONTAL:
  48.                target.scaleX += 0.08;
  49.          }
  50.          if(target.scaleX >= 0.98 && target.scaleY >= 0.98)
  51.          {
  52.             _done = true;
  53.             target.scaleX = target.scaleY = 1;
  54.          }
  55.       }
  56.    }
  57. }
  58.  
  59.